<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
  

 </head>
 <body>
  上传图片:<input type="file"  id="myfile" name="myimgfile"> <input type="button" id="btn" value="提交">

显示上传的图片:<div  style="width:300px;height:200px;" id="pic_show">

       <img src=""/>


         </div>
         <script type="text/javascript" src="js/jquery.min.js"></script>
         <script type="text/javascript">
               $(document).ready(function(){
       
               $("#btn").click(function(){
               //var file =document.getElementById("myfile");
               var file=$("#myfile").get(0);
               var imgUrl =window.URL.createObjectURL(file.files[0]);
               $("#pic_show").html("<img src="+imgUrl+" style=height:200px;width:200px;>");
               });
       
               });
         </script>
 </body>
</html>
